package com.example.greendaodemo.application;

import android.app.Application;
import android.content.Context;

/**
 * @author: njb
 * @date: 2020/3/2 0002 13:48
 * @desc:
 */
public class App extends Application {
    private static Context mContext;
    private static App sInstance;
   // DaoMaster.DevOpenHelper mHelper;
  //  DaoMaster mDaoMaster;
   // private DaoSession mDaoSession;

    @Override
    public void onCreate() {
        super.onCreate();
        mContext = getApplicationContext();
        sInstance = this;
        initDataBase();
    }

    private void initDataBase() {
     /*   mHelper = new DaoMaster.DevOpenHelper(this,"test.db",null);
        SQLiteDatabase db = mHelper.getWritableDatabase();

        mDaoMaster = new DaoMaster(db);

        mDaoSession = mDaoMaster.newSession();*/
    }


    public static Context getContext() {
        return mContext;
    }
    public static App getInstance(){

        return sInstance;
    }

   /* public DaoSession getmDaoSession() {
        return mDaoSession;
    }*/
}
